# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-onelogin
_pkgname=onelogin
pkgver=3.2.0
pkgrel=1
pkgdesc='OneLogin API.'
arch=('any')
url='https://pypi.org/project/onelogin/#files'
license=('MIT')
depends=('python' 'python-certifi' 'python-frozendict' 'python-dateutil'
         'python-typing_extensions' 'python-urllib3')
makedepends=('python-build' 'python-pip' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('a7b07ef2299d2fe3dddf8a59368b6b09a20c5a9a24b3a788b6d0a19ef596d2532783701f7e4dd8fb970e81c0763efd211b053aaf75f93a026f2d97f4c0bf923f')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

